package com.yiyi.credit.manage.abutment.common.enums;

public enum InterfacePathEnum {

    CREDIT_MULTIAPPL("/credit/multiappl","多重风险检测详版"),
    CREDIT_CONSUMABLIITY("/credit/consumability","个人履约能力综合查询"),
    CREDIT_SCORE_GENERAL_FACTORS("/credit/score/general/factors","个人综合信用评分查询"),
    CRIMINAL_QUERYSCORE("/criminal/queryscore","公共风险评分"),
    IDEN_LOCAT("/iden/locat","身份证归属地信息查询"),
    TELECOM_IDENTITY("/telecom/identity/3mo/t1","手机实名认证"),
    AUTH_CNCM("/auth/cncm/t2","四要素验证"),
    RISKINFO_CREDIT("/riskinfo/credit","信贷中介信息查询"),
    EDU_QUERY("/edu/query","学历信息查询"),
    IDENTITY_AUTH("/identity/auth","个人身份验证"),
    BANK_CARDBIN("/bank/cardbin","银行卡BIN信息查询"),

    RISKINFOT1("/riskinfo/t1","风险信息标准查询"),
    RISKINFOT1DETAIL("/riskinfo/t1/detail","判决文书详情查询"),
    TRANSREPORTT2("/trans/report/t2","个人交易报告查询"),
    CERT("/cert","个人职业资格证书查询"),
    VEHICLEINFO("/vehicle/info","历史车产信息查询"),
    TELECOMCONSUMABILITY("/telecom/consumability","运营商消费水平查询"),
    TELECOMSTATETIME("/telecom/statetime","运营商状态和时长查询"),
    ICINFO_CATEGORY("/icinfo/category","工商信息查询"),
    ICINFO_CATEGORY_PERSON_TID("/icinfo/category/person/tid","根据流水号,自然人姓名查询工商信息"),
    ICINFO_REPORT("/icinfo/report","企业信用报告查询"),
    AIRTRAVEL_TRAREPORT("/airtravel/trareport","航空出行画像");

    private final String path;
    private final String msg;

    InterfacePathEnum(String path, String msg)
    {
        this.path = path;
        this.msg = msg;
    }

    public String getPath()
    {
        return path;
    }

    public String getMsg()
    {
        return msg;
    }
    public static boolean isInterfacePath(String code)
    {
        for (InterfacePathEnum s : InterfacePathEnum.values())
        {
            if (s.getPath().equals(code))
            {
                return true;
            }
        }
        return false;
    }
    /**
     * 根据编码获取信息
     * @param code
     * @return
     */
    public static String getMsgByCode(String code)
    {
        for (InterfacePathEnum v : InterfacePathEnum.values())
        {
            if (v.getPath().equals(code))
            {
                return v.getMsg();
            }
        }
        return "未知结果";
    }
}
